export default class supScripts {
    public static mds: Map<string, any> = new Map();
    public static mus: Map<string, any> = new Map();
    protected name: string = null;
    protected uuid: string = null;
    constructor(md: boolean, name: string) {
        if (md) {
            supScripts.mds[name] = this;
        }
        else {
            supScripts.mus[name] = this;
        }
        this.name = name;
    }

    public static setModule(name: string, mode: any) {
        supScripts.mds[name] = mode;
    }

    public static setMount(name: string, mout: any) {
        supScripts.mus[name] = mout;
    }

    public static getModule(name: string): any {
        return supScripts.mds[name];
    }

    public static getMount(uuid: string): any {
        return supScripts.mus[uuid];
    }

    public getModule(name: string): any {
        return supScripts.mds[name ? name : this.name];
    }

    public getMount(uuid: string): any {
        return supScripts.mus[uuid ? uuid : this.uuid];
    }

    public setModule(name: string, mode: any) {
        supScripts.mds[name ? name : this.name] = mode;
    }

    public setMount(uuid: string, mout: any) {
        supScripts.mus[uuid ? uuid : this.uuid] = mout;
    }

    public dispatchs(data: msgBody) {

    }
}